// pages/orderList/orderList.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        navbarlist:[
            "全部",
            "待支付",
            "待自提/配送",
            "待评价",
            "退/换货"
        ],
        slider_offset: 0,
        slider_left: 0,
        slider_width: 0
    },

    onLoad: function () {
        this.setData({
            slider_left: 0,
            slider_offset: this.data.window_width / 2 * this.data.tab_index,
            slider_width: this.data.window_width / 2
        });

    },
    onReady: function () {

    },
    onShow: function () {

    },
    onHide: function () {

    },
    onPullDownRefresh: function () {

    },
    onReachBottom: function () {

    },
    onShareAppMessage: function () {

    },
    handleTab: function (event) {
        this.setData({
            slider_offset: event.currentTarget.offsetLeft,
            tab_index: event.currentTarget.id
        });
    }
})